package ControllerApplication;

import java.util.List;

import ModelApplication.Sound;
import ProcessingAudioWindows.F2AudioProcessingWindow;
import ProcessingAudioWindows.T1AudioProcessingWindow;

public class AudioProcessingFactory {

	public static AudioProcessingLocal getAudioProcessing(int selectedMethod, String methodName, int windowX, int windowY, List<Sound> sounds) {

		AudioProcessingMethods processingMethod = AudioProcessingMethods.fromInteger( selectedMethod );

		if(processingMethod.equals( AudioProcessingMethods.T1 )) {
			return (AudioProcessingLocal) new T1AudioProcessing( methodName, new T1AudioProcessingWindow(windowX, windowY) );
		} else if(processingMethod.equals( AudioProcessingMethods.F2 )) {
			return (AudioProcessingLocal) new F2AudioProcessing( methodName, new F2AudioProcessingWindow(windowX, windowY) );
		}

		return null;

	}

}
